home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / recipe.dxr / 00014_Drink Name Behavior.ls < prev    next >
Encoding:
Text File  |  2000-03-23  |  915 b   |  51 lines

  1. property pMyBarSlot, pSpr
  2.  
  3. on beginSprite me
  4.   pSpr = sprite(me.spriteNum)
  5.   customFont(pSpr.member)
  6.   mRefresh(me)
  7. end
  8.  
  9. on endSprite
  10.   pSpr.visible = 1
  11. end
  12.  
  13. on mRefresh me
  14.   if not isText(pSpr) then
  15.     exit
  16.   end if
  17.   pSpr.member.text = pSpr.member.text
  18.   pSpr.member.color = blue()
  19.   if inRecipeMode() then
  20.     pSpr.visible = 0
  21.   else
  22.     pSpr.visible = 1
  23.   end if
  24. end
  25.  
  26. on mouseDown me
  27.   global gBarTopManager
  28.   if gBarTopManager.pBarSpots[pMyBarSlot][#charCode] = #none then
  29.     alertBeep()
  30.   else
  31.     tell the stage
  32.       makePatronActive(pMyBarSlot)
  33.     end tell
  34.     goToLabel("Current" & pMyBarSlot)
  35.   end if
  36. end
  37.  
  38. on mouseEnter
  39.   pSpr.member.color = red()
  40.   sprite(24).locV = pSpr.locV
  41. end
  42.  
  43. on mouseLeave
  44.   pSpr.member.color = blue()
  45.   sprite(24).locV = -50
  46. end
  47.  
  48. on getPropertyDescriptionList
  49.   return [#pMyBarSlot: [#default: 1, #range: [#min: 1, #max: 3], #format: #integer, #comment: "Slot number:"]]
  50. end
  51.